Data processing device and data processing method

ABSTRACT

A data processor is provided to compression-code moving picture data without decreasing coding efficiency even if the moving picture includes a picture with particularly violent motion. The moving picture is obtained by presenting a plurality of frame pictures, each consisting of two field pictures, one after another. The processor ( 100 ) includes a memory ( 101 ) for storing the moving picture data, a calculating section ( 108 ) for calculating a parameter, representing how much the moving picture has changed, based on the moving picture data of the two field pictures, a determining section ( 109 ) for determining, by the parameter calculated, on what picture unit the moving picture data is going to be compression-coded by the intra-picture coding method and the forward predictive coding method and adopting a picture structure defining the predetermined picture unit, and a processing section ( 102 - 107, 110 ) for compression-coding the moving picture data, stored in the memory, according to the picture structure adopted, thereby generating compressed data.

TECHNICAL FIELD

The present invention relates to a moving picture coding technology forcompressing moving picture data with high efficiency.

BACKGROUND ART

MPEG-1, MPEG-2 and so on are known as standards for coding movingpicture data with high efficiency. In the MPEG-1 and MPEG-2, movingpicture data is coded by an intra-picture coding method, a forwardpredictive coding method or a bidirectional predictive coding methodappropriately selected.

When coded by such a moving picture coding technique, a moving pictureis often a mixture of pictures that have been compression and coded(compression-coded) by the intra-picture coding method (which will bereferred to herein as “I-pictures”), pictures that have beencompression-coded by the forward predictive coding method (which will bereferred to herein as “P-pictures”) and pictures that have beencompression-coded by the bidirectional predictive coding method (whichwill be referred to herein as “B-pictures”). An I-picture is coded usingonly the data in the picture itself and without doing any temporalprediction. A P-picture is predictively coded by reference to an I- orP-picture, which is located before the P-picture. And a B-picture ispredictively coded by reference to I- and P-pictures, which are locatedbefore and after the B-picture. The pictures to be referred to arecalled “reference pictures”. The reference pictures for use inprediction are determined according to the type of the given picture.

FIG. 1 shows a moving picture data prediction scheme using bidirectionalprediction. In FIG. 1, I, P and B denote an I-picture, P-pictures andB-pictures, respectively. In the prediction scheme shown in FIG. 1, theorder of coding is I1, P4, B2, B3, P7, B5 and B6. In FIG. 1, the pictureI1 is intra-picture coded. The picture P4 is forward predictive coded byreference to the picture I1. Each of the pictures B2 and B3 isbidirectionally predictive coded by reference to the pictures I1 and P4.The picture P7 is forward predictive coded by reference to the pictureP4. Each of the pictures B5 and B6 is bidirectionally predictive codedby reference to the pictures P4 and P7.

The I-, P- and B-pictures are usually arranged periodically. FIG. 2shows an arrangement of I-pictures, P-pictures and B-pictures. Ingeneral, I-pictures are arranged every N frames, P-pictures are arrangedevery M frames between two I-pictures, and (M-1) B-pictures are providedbetween the I-picture and the following P-picture and between thatP-picture and the following P-picture. FIGS. 3( a), 3(b) and 3(c) showcorrespondence between the order in which respective types of picturesof the moving picture data are input and the order in which thosepictures are coded in three situations where M=1, M=2 and M=3,respectively.

As shown in FIG. 3( a), if M=1, then the moving picture consists of onlyI- and P-pictures and includes no B-pictures. Accordingly, therespective pictures in the incoming moving picture are coded withoutchanging the order at all, thus causing no processing delay during thecoding process. However, if M=2, then one B-picture is present betweenthe I-picture (or a P-picture) and the next P-picture as shown in FIG.3( b). In that case, a processing delay of one frame is caused beforeeach B-picture starts being coded. The reason is as follows.Specifically, no B-picture is allowed to start being coded until itsreference pictures (i.e., I- and P-pictures), located before and afterthe B-picture, have been coded. Accordingly, the B-picture must be codedin a different order from that of the incoming pictures.

If M=3, then two B-pictures are present between the I-picture (or aP-picture) and the next P-picture as shown in FIG. 3( c). In that case,for the same reason as that described for FIG. 3( b), a delay of twoframes is caused before each B-picture starts being coded.

The B-pictures are used because the efficiency of prediction can beincreased by adopting the bidirectional prediction technique as acombination of the forward and backward predictions. Also, unlike the I-or P-picture, no B-picture will be used as a reference picture insubsequent predictive coding. Thus, the error caused during thepredictive coding process never propagates. Accordingly, even if theB-picture is coded at a lower amount of data than the I- or P-picture,the deterioration in image quality should be much less visible. However,when B-pictures are used, the reference picture interval M for theP-pictures to be forward predicted increases due to the insertion of theB-pictures. Accordingly, the prediction tends to be particularlyinaccurate for a moving picture with swift motion, among other things.

In view of these considerations, the coding efficiency can be improvedby dynamically switching the reference picture interval M for forwardprediction in accordance with the property of the given moving picturedata.

Conventional techniques of coding with the reference picture interval Mfor forward prediction switched dynamically are disclosed in JapaneseLaid-Open Publication No. 9-294266, Japanese Laid-Open Publication No.10-304374, and Japanese Laid-Open Publication No. 2001-128179, forexample.

Japanese Laid-Open Publication No. 9-294266 describes a technique ofscaling motion vector of a coded frame and controlling the referencepicture interval M such that its magnitude falls within the motionsearch range of the frame to be coded next.

Japanese Laid-Open Publication No. 10-304374 describes a technique ofestimating the inter-frame prediction efficiency by using a predictionerror or activity obtained from a coded block and controlling thereference picture interval M according to this prediction efficiency.

Japanese Laid-Open Publication No. 2001-128179 describes a technique ofestimating the inter-frame predictability by using the coding rates orcomplexity of coding of the respective types of pictures and controllingthe reference picture interval M according to this predictability.

In an interlaced moving picture in which one frame picture is composedof two field pictures, the reference pictures can be switched and thecoding efficiency can be increased not just by switching the referencepicture intervals M but also by changing the picture structures. Thepicture structure is a coding unit. Thus, either a frame structure or afield structure may be selected for each picture to be coded.Specifically, if the frame structure is selected as the picturestructure, the coding is carried out on a frame-by-frame basis. On theother hand, if the field structure is selected, then the coding iscarried out based on first and second field pictures that make up oneframe.

In the following description, a field picture to be intra-picture codedwill be referred to herein as an “I-field”, a field picture to beforward predictive coded will be referred to herein as a “P-field”, anda field picture to be bidirectionally predictive coded will be referredto herein as a “B-field”. Also, by looking at the type of the firstfield picture, a frame of which the first field is an I-field will bereferred to herein as an “I-frame”, a frame of which the first field isa P-field will be referred to herein as a “P-frame”, and a frame ofwhich the first field is a B-field will be referred to herein as a“B-frame”.

FIGS. 4( a), 4(b) and 4(c) shows relationships between picture types andreference pictures according to the field structure. Specifically, FIG.4( a) shows I-frames, FIG. 4( b) shows a P-frame, and FIG. 4( c) shows aB-frame. In the I-frame shown in FIG. 4( a), either a type of which thefirst and second field pictures are both I-fields or a type of which thefirst and second field pictures are an I-field and a P-field,respectively, is selected. If the second field picture is a P-field,then the first field picture of the same frame is used as the referencepicture. In the P-frame shown in FIG. 4( b), the first field picturethereof uses the previously coded I- or P-field as the reference pictureof the predictive coding. On the other hand, the second field picturemay use the first field picture of the same frame (i.e., the previousfield picture) as the reference picture. As a result, the referencepicture interval for the second field picture is just one field, thusincreasing the prediction efficiency significantly for a picture with afast motion, in particular. In the B-frame shown in FIG. 4( c), each ofthe first and second field pictures uses the I- and P-field of theprevious and succeeding frames as the reference pictures of thepredictive coding.

Recently, a technique of realizing compression coding of good qualitymore efficiently even if the moving picture has a particularly fastmotion is in high demand. To achieve this object, however, the motionvelocity of a moving picture needs to be judged as high or low and thecoding control needs to be improved so as to maintain a good quality andreduce the data size, both of which have been satisfied onlyinsufficiently by the prior art so far.

An object of the present invention is to estimate the motion velocity ofa moving picture more accurately in compression-coding moving picturedata and to realize highly efficient compression coding of good qualityby dynamically switching the coding methods and coding units even if apicture with a fast motion is included.

DISCLOSURE OF INVENTION

A data processor according to the present invention compression-codesmoving picture data, representing a moving picture, on the basis of apredetermined picture unit by an intra-picture coding method, a forwardpredictive coding method or a bidirectional predictive coding method.The moving picture is obtained by presenting a plurality of framepictures, each consisting of two field pictures, one after another. Thedata processor includes: a memory for storing the moving picture data; acalculating section for calculating a parameter, representing how muchthe moving picture has changed, based on the moving picture data of thetwo field pictures; a determining section for determining, by theparameter that has been calculated by the calculating section, on whatpicture unit the moving picture data is going to be compression-coded bythe intra-picture coding method and the forward predictive coding methodand adopting a picture structure defining the predetermined pictureunit; and a processing section for compression-coding the moving picturedata, stored in the memory, according to the picture structure that hasbeen adopted by the determining section, thereby generating compresseddata.

In one preferred embodiment, the calculating section obtains a temporalvariation from a variation in the moving picture data between the twofield pictures and a spatial variation from a variation in the movingpicture data within each of the two field pictures, and calculates theparameter based on the temporal and spatial variations.

In another preferred embodiment, the two field pictures are a firstfield picture corresponding to odd-numbered lines of the frame pictureand a second field picture corresponding to even-numbered lines of theframe picture. The calculating section specifies two lines of the firstand second field pictures, which are adjacent to each other within theframe picture, and obtains a difference between the moving picture dataof the two lines, thereby calculating the temporal variation. Thecalculating section also specifies two adjacent lines within each of thefirst and second field pictures, and obtains a difference between themoving picture data of the two lines, thereby calculating the spatialvariation.

In another preferred embodiment, the calculating section divides eachsaid frame picture into multiple blocks, calculates the temporal andspatial variations based on the moving picture data of each of theblocks, and calculates, as the parameter, a ratio of the number ofblocks, of which the variation in the moving picture is at least equalto a predetermined degree, to the overall number of blocks based on thetemporal and spatial variations of the respective blocks.

In another preferred embodiment, if the parameter is greater than apredetermined threshold value, the determining section adopts a fieldstructure as the picture structure, and the processing sectioncompression-codes the moving picture data on a field picture basis.

In another preferred embodiment, the determining section increases thenumber of field pictures to be compression-coded by the intra-picturecoding method and/or the number of field pictures to becompression-coded by the forward predictive coding method.

In another preferred embodiment, the determining sectioncompression-codes the field pictures either by the intra-picture codingmethod only or by the forward predictive coding method only.

In another preferred embodiment, if the parameter that has beencalculated by the calculating section has become smaller than thepredetermined threshold value, then the determining section adopts aframe structure as the picture structure, and the processing sectioncompression-codes the moving picture data on a frame picture basis.

In another preferred embodiment, if a first picture to becompression-coded by the forward predictive coding method and a secondpicture to be predictive coded by reference to the first picture arecontiguous with each other, then the determining section adopts a fieldstructure as the picture structure of the second picture. But if thefirst and second pictures are not contiguous with each other, then thedetermining section adopts the frame structure as the picture structureof the second picture.

In another preferred embodiment, if a first picture to becompression-coded by the forward predictive coding method and a secondpicture to be predictive coded by reference to the first picture arecontiguous with each other, then the determining section adopts either aframe structure or a field structure as the picture structure of thesecond picture. But if the first and second pictures are not contiguouswith each other, then the determining section adopts the frame structureas the picture structure of the second picture.

In another preferred embodiment, the determining section determines thepicture structure of pictures to be compression-coded by the forwardpredictive coding method according to a period that is defined by eithera plurality of pictures to be compression-coded by the intra-picturecoding method or a plurality of pictures to be compression-coded by theforward predictive coding method.

In another preferred embodiment, the determining section determines thepicture structure of the pictures to be compression-coded by the forwardpredictive coding method according to the period that is defined by thepictures to be compression-coded by the intra-picture coding method.

In another preferred embodiment, the determining section determines thepicture structure of the pictures to be compression-coded by the forwardpredictive coding method according to the period that is defined by thepictures to be compression-coded by the forward predictive codingmethod.

In another preferred embodiment, if a first picture to becompression-coded by the intra-picture coding method and a secondpicture to be compression-coded by the forward predictive coding methodby reference to the first picture are contiguous with each other, thenthe determining section adopts a field structure as the picturestructure of the first picture and determines that the first and secondfield pictures of the first picture be compression-coded by theintra-picture coding method and the forward predictive coding method,respectively.

In another preferred embodiment, the determining section determines thatthe picture structure of a picture to be compression-coded by theintra-picture coding method be the same as that of the previous picturethat has just been compression-coded by either the intra-picture codingmethod or the forward predictive coding method.

In another preferred embodiment, the determining section determines thatthe picture structure of a picture to be compression-coded by theintra-picture coding method be the same as that of the next picture tobe compression-coded by either the intra-picture coding method or theforward predictive coding method.

In another preferred embodiment, the determining section determines thatthe picture structure of a first picture to be compression-coded by thebidirectional predictive coding method be the same as that of areference picture to be referred to by the first picture.

A data processing system according to the present invention includes thedata processor described above and a transmitting section fortransmitting the compressed data, which has been generated by theprocessing section of the data processor, through a transport medium.

Another data processing system according to the present inventionincludes the data processor described above, and a writing section forwriting the compressed data, which has been generated by the processingsection of the data processor, onto a storage medium.

Another data processor according to the present inventioncompression-codes moving picture data, representing a moving picture, onthe basis of a predetermined picture unit by an intra-picture codingmethod, a forward predictive coding method or a bidirectional predictivecoding method. The moving picture is obtained by presenting a pluralityof frame pictures one after another. The data processor includes: amemory for storing the moving picture data; a calculating section forcalculating a temporal variation representing a variation in the movingpicture data between two contiguous frame pictures and a spatialvariation representing a variation in the moving picture data withineach of the two frame pictures, and also calculating a parameter,representing how much the moving picture has changed, based on thetemporal and spatial variations; a determining section for determining,by the parameter that has been calculated by the calculating section,what compression coding method should be adopted for each of the framepictures; and a processing section for compression-coding the movingpicture data, stored in the memory, by the method that has been adoptedby the determining section, thereby generating compressed data.

In one preferred embodiment, the moving picture is obtained bypresenting one after another a plurality of frame pictures, eachconsisting of two field pictures. The two field pictures are a firstfield picture corresponding to odd-numbered lines of the frame pictureand a second field picture corresponding to even-numbered lines of theframe picture. The calculating section specifies two lines of the firstand second field pictures, which are adjacent to each other within theframe picture, and obtains a difference between the picture data of thetwo lines, thereby calculating the temporal variation. The calculatingsection also specifies two adjacent lines within each of the first andsecond field pictures, and obtains a difference between the picture dataof the two lines, thereby calculating the spatial variation.

In another preferred embodiment, the calculating section specifies twolines, which are located at the same position within the two framepictures, and obtains a difference between the picture data of the twolines, thereby calculating the temporal variation. The calculatingsection also specifies two adjacent lines within one of the two framepictures, and obtains a difference between the picture data of the twolines, thereby calculating the spatial variation.

In another preferred embodiment, the determining section increases thenumber of frame pictures to be compression-coded by the intra-picturecoding method and/or the number of frame pictures to becompression-coded by the forward predictive coding method.

In another preferred embodiment, the determining sectioncompression-codes the frame pictures either by the intra-picture codingmethod only or by the forward predictive coding method only.

Another data processing system according to the present inventionincludes the data processor described above, and a transmitting sectionfor transmitting the compressed data, which has been generated by theprocessing section of the data processor, through a transport medium.

Yet another data processing system according to the present inventionincludes the data processor described above, and a writing section forwriting the compressed data, which has been generated by the processingsection of the data processor, onto a storage medium.

A data processing method according to the present invention is a methodfor compression-coding moving picture data, representing a movingpicture, on the basis of a predetermined picture unit by anintra-picture coding method, a forward predictive coding method or abidirectional predictive coding method. The moving picture is obtainedby presenting a plurality of frame pictures, each consisting of twofield pictures, one after another. The method includes the steps of:storing the moving picture data; calculating a parameter, representinghow much the moving picture has changed, based on the moving picturedata of the two field pictures; determining, by the parametercalculated, on what picture unit the moving picture data is going to becompression-coded by the intra-picture coding method and the forwardpredictive coding method and adopting a picture structure defining thepredetermined picture unit; and compression-coding the moving picturedata according to the picture structure adopted, thereby generatingcompressed data.

Another data processing method according to the present invention is amethod for compression-coding moving picture data, representing a movingpicture, on the basis of a predetermined picture unit by anintra-picture coding method, a forward predictive coding method or abidirectional predictive coding method. The moving picture is obtainedby presenting a plurality of frame pictures one after another. Themethod includes the steps of: storing the moving picture data;calculating a temporal variation representing a variation in the movingpicture data between two contiguous frame pictures and a spatialvariation representing a variation in the moving picture data withineach of the two frame pictures; calculating a parameter, representinghow much the moving picture has changed, based on the temporal andspatial variations; determining, by the parameter calculated, whatcompression coding method should be adopted for each of the framepictures; and compression-coding the stored moving picture data by theadopted method, thereby generating compressed data.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 shows a moving picture data prediction scheme by bidirectionalprediction.

FIG. 2 shows the arrangement of I-pictures, P-pictures and B-pictures.

FIGS. 3( a), 3(b) and 3(c) show correspondence between the order inwhich respective types of pictures of the moving picture data are inputand the order in which those pictures are coded in three situationswhere M=1, M=2 and M=3, respectively.

FIGS. 4( a), 4(b) and 4(c) respectively show what frames an I-frame, aP-frame and a B-frame refer to.

FIG. 5 shows an arrangement of functional blocks for a moving picturecoder 100 according to a preferred embodiment.

FIG. 6 is a flowchart showing the flow of a process to be carried out bythe moving picture coder 100.

FIG. 7 shows the concepts of temporal variation (A) and spatialvariation (B).

FIG. 8 shows an example in which one frame picture is divided into aplurality of blocks.

FIG. 9 is a flowchart showing the order of processing to be performed bythe predicting method determining section 109 for determining a codingmethod on a frame picture basis and a picture structure for compressioncoding.

FIG. 10 is a flowchart showing the order of processing for determining acoding method on a frame picture basis.

FIG. 11 is a flowchart showing the order of processing for determining apicture structure for compression coding.

FIG. 12( a) shows the data structure of compression-coded picture dataas a frame structure, and FIG. 12( b) shows the data structure ofcompression-coded frame picture data as a field structure.

FIG. 13 shows relationships between the degree-of-variation parameterand the picture structure of compressed data.

FIG. 14 is a flowchart showing the order of processing for determining aframe picture coding method according to a predetermined period and apicture structure for compression coding.

FIG. 15( a) shows the arrangement of functional blocks for an encodingsystem 10, and FIG. 15( b) shows the arrangement of functional blocksfor a decoding system 11.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, preferred embodiments of the present invention will bedescribed with reference to the accompanying drawings.

FIG. 5 shows an arrangement of functional blocks for a moving picturecoder 100 according to a preferred embodiment. The moving picture coder100 compression-codes moving picture data, obtained from a movingpicture signal such as a TV signal, in compliance with the MPEG-2standard, for example, thereby outputting compressed data. The movingpicture data represents a moving picture and includes data aboutrespective frame pictures. Optionally, the moving picture data may alsoinclude sound-related audio data. By presenting a series of framepictures and sound continuously, the moving picture becomes a viewableand audible object.

Hereinafter, a configuration for the moving picture coder 100 will bedescribed. The moving picture coder 100 includes an input picture memory101, a decoded picture memory 102, a motion vector estimating section103, a motion compensating predicting section 104, a DCT/quantizingsection 105, an inverse quantizing/IDCT section 106, a variable-lengthcoding section 107, a degree-of-variation parameter calculating section108, a predicting method determining section 109 and a coding ordercontrol section 110.

The input picture memory 101 stores the input moving picture signal asmoving picture data until the moving picture signal is coded. The movingpicture data is stored in the memory 101 in such a format as to identifya series of pictures one by one. Also, the memory 101 can store thepicture data in a sufficiently large number to cope with the processingdelay of each picture due to the coding order. Accordingly, even if thecoding order of the moving picture data is different from the order inwhich the moving picture data has been input while the moving picturecoder 100 is compression-coding the moving picture data, the processingcan be continued. For example, as for the arrangement of picture typesshown in FIG. 3( c), the input picture memory 101 can store picture datacorresponding to at least four frame pictures. The moving picture datais coded in the coding order to be specified by the coding order controlsection 110 as will be described later.

The decoded picture memory 102 stores decoded picture data, which isobtained by adding together the picture data decoded by the inversequantizing/IDCT section 106 and the motion compensated predicted picturedata obtained by the motion compensating predicting section 104. Thedecoded picture data will be used as reference picture data by themotion vector estimating section 103 and motion compensating predictingsection 104.

By reference to the picture data stored in the decoded picture memory102, the motion vector estimating section 103 estimates the magnitude ofmotion (or variation) of the picture data in the input picture memory101 as a motion vector.

The motion compensating predicting section 104 generates motioncompensated predicted picture data by using the motion vector that hasbeen estimated by the motion vector estimating section 103 and thedecoded picture data stored in the decoded picture memory 102.

The DCT/quantizing section 105 performs a discrete cosine transform(DCT) on the predicted error data and quantizes the error data with aspecified quantization value. The predicted error data corresponds tothe difference between the picture data in the input picture memory 101and the motion compensated predicted picture data generated by themotion compensating predicting section 104. Optionally, theDCT/quantizing section 105 may process the input picture data itselfwithout using the motion compensated predicted picture data.

In processing the pictures as I- and P-pictures, the inversequantizing/IDCT section 106 performs inverse quantization and inversediscrete cosine transform (IDCT) on the encoded data obtained by theDCT/quantizing section 105, thereby generating decoded pictures to beused as reference pictures.

The variable-length coding section 107 performs variable-length codingon the data that has been subjected to the DCT and quantization by theDCT/quantizing section 105 and on motion location information about themotion vector that has been estimated by the motion vector estimatingsection 103, thereby outputting compressed data.

The degree-of-variation parameter calculating section 108 calculates adegree-of-variation parameter using a temporal variation and a spatialvariation, obtained from picture feature quantities, with respect to thepicture data of the pictures stored in the input picture memory 101. Inthis case, the “picture feature quantities” refer to pixel data (e.g.,brightness data) values at respective coordinates of a picture and areelements that make up the picture data. The degree-of-variationparameter represents the degree of variation in contents (i.e., violenceor quickness) between the respective pictures of a moving picture to bepresented. More specific processing to be done by thedegree-of-variation parameter calculating section 108 will be describedin detail later.

A predicting method determining section 109 determines the referencepictures and the picture structure of the picture to be encodedaccording to the degree-of-variation parameter that has been calculatedby the degree-of-variation parameter calculating section 108.

In accordance with the predicting method that has been determined by thepredicting method determining section 109, a coding order controlsection 110 controls the coding order of the picture data that is storedin the input picture memory 101.

One of the principal features of the moving picture coder 100 of thepresent invention lies in the processing to be carried out by thedegree-of-variation parameter calculating section 108 and the predictingmethod calculating section 109. Thus, the processing to be done by thesecomponents will be described particularly in detail while the operationof the moving picture coder 100 is described. It should be noted thatthe other components, identified by the reference numerals 102 through107 and 110, will be referred to as a “processing section” collectivelyunless any of them needs to be explained specifically.

In the following description, the moving picture is supposed to be aninterlaced picture. Thus, one frame picture is composed herein of twofield pictures.

FIG. 6 shows the flow of the process to be carried out by the movingpicture coder 100. First, in Step 601, the moving picture coder 100receives a moving picture signal and stores it as moving picture data inthe input image memory 101. Next, in Step 602, the degree-of-variationparameter calculating section 108 calculates a degree-of-variationparameter based on the moving picture data of multiple pictures.Specifically, first, the degree-of-variation parameter calculatingsection 108 obtains a temporal variation from the variation between thepicture data representing the first and second field pictures that makeup one frame picture. Next, the degree-of-variation parametercalculating section 108 further calculates a spatial variation based onthe variation of the picture data in the picture for each of the firstand second field pictures. Thereafter, the degree-of-variation parametercalculating section 108 calculates the degree-of-variation parameterbased on the temporal and spatial variations thus obtained. This processstep will be described in further detail with reference to theaccompanying drawings.

It should be noted that in this preferred embodiment, the frame picturefor which the temporal and spatial variations are calculated is supposedto be a candidate picture to be compression-coded as an I-picture or aP-picture. The candidate pictures are selected preliminarily accordingto the predetermined rule for the moving picture coder 100. For example,among the frame pictures included in the input moving picture data,candidate pictures to be I-pictures are selected every N frames andcandidate pictures to be P-pictures are selected every M frames betweentwo I-pictures. It will be determined afterward through a series ofprocessing to be done by the moving picture coder 100 which of I-, P-and B-pictures each frame picture will be in the end.

FIG. 7 shows the concepts of temporal variation (A) and spatialvariation (B). First of all, one frame picture is composed of two fieldpictures. For convenience sake, the first field picture is supposed tobe a picture representing the odd-numbered lines (i.e., the black linesshown in FIG. 7) of one frame picture, while the second field picture issupposed to be a picture representing the even-numbered lines (i.e., thewhite lines shown in FIG. 7) of that frame picture.

The temporal variation Dt(A) can be obtained as an average value of thesum of the differences (A) between the pixel data of two verticallyadjacent pixels in one frame picture. The “two adjacent pixels” consistof a pixel belonging to the first field picture and its associated pixelbelonging to the second field. On the other hand, the spatial variationDs(B) can be obtained as an average value of the sum of the differences(B) between the pixel data of two vertically adjacent pixels within thefirst field or the second field.

The degree-of-variation parameter calculating section 108 calculates thetemporal variation Dt and spatial variation Ds by the followingEquations (1) and (2), respectively:

$\begin{matrix}{{Dt} = {\sum\limits_{x,y}{{{{F\left( {x,y} \right)} - {F\left( {x,{y + 1}} \right)}}}/{Nt}}}} & \left( {{Equation}\mspace{20mu} 1} \right) \\{{Ds} = {\sum\limits_{x,y}{{{{F\left( {x,y} \right)} - {F\left( {x,{y + 2}} \right)}}}/{Ns}}}} & \left( {{Equation}\mspace{20mu} 2} \right)\end{matrix}$where F(x, y) represents a pixel value (e.g., a brightness value) at thecoordinates (x, y) on the screen and Nt and Ns represent the number ofdifference data counts to be added together in Equation (1) and thenumber of difference data counts to be added together in Equation (2),respectively. If a moving picture has little motion (i.e., variation),then the temporal variation Dt is smaller than the spatial variation Ds.This means that frame correlation is stronger than field correlation.Meanwhile, as the motion of a moving picture goes faster, the temporalvariation Dt increases and the field correlation becomes stronger andstronger than the frame correlation. In this case, the value of thedegree-of-variation parameter Cf of the given picture is calculated bythe following Equation (3) using the temporal and spatial variations Dtand Ds obtained by Equations (1) and (2), respectively:Cf=1 (if Dt=0 and Ds=0)Cf=(A·Dt+Ds)/(Dt+A·Ds)(otherwise)  (Equation 3)where A is a constant to adjust the possible value range of thedegree-of-variation parameter Cf and is supposed to be a number greaterthan 1.

As can be seen from Equation (3), the greater the temporal variation Dt,the greater the value of the degree-of-variation parameter Cf. Statedotherwise, the greater the degree-of-variation parameter Cf, the fasterthe motion of a moving picture is. In particular, by calculating thedegree-of-variation parameter Cf based on the picture data of two fieldpictures that make up one frame picture, even a moving picture with anextremely fast motion can be processed satisfactorily.

Also, when the motion velocity of a moving picture is judged only by thetemporal variation, the motion might be judged as fast even if theobject within the moving picture shifted by just one pixel. However, byjudging the motion velocity by the spatial variation as well as thetemporal variation, the influence of a small pixel shift can be reduced.As a result, the motion velocity of the moving picture can be judgedmore accurately.

In Equations (1) and (2), the temporal and spatial variations Dt and Dsare obtained by averaging the sum of the absolute values of thedifferences. Alternatively, these variations may also be obtained byaveraging the sum of the squares of the differences as in the followingEquations (4) and (5):

$\begin{matrix}{{Dt} = {\sum\limits_{x,y}{\left\{ {{F\left( {x,y} \right)} - {F\left( {x,{y + 1}} \right)}} \right\}^{2}/{Nt}}}} & \left( {{Equation}\mspace{20mu} 4} \right) \\{{Ds} = {\sum\limits_{x,y}{\left\{ {{F\left( {x,y} \right)} - {F\left( {x,{y + 2}} \right)}} \right\}^{2}/{Ns}}}} & \left( {{Equation}\mspace{20mu} 5} \right)\end{matrix}$where the respective terms represent the same quantities as thecounterparts of Equations (1) and (2). As another alternative, thetemporal and spatial variations Dt and Ds may also be obtained by otherformulae using differential quantities.

It has been described with reference to FIG. 7 how to calculate thevalue of the degree-of-variation parameter Cf by obtaining the temporaland spatial variations based on the pixel data of either the entireframe picture or the entire field picture. However, thedegree-of-variation parameter Cf may also be obtained by a differentmethod. Hereinafter, that alternative method will be described.

FIG. 8 shows an example in which one frame picture is divided into aplurality of blocks. The degree-of-variation parameter calculatingsection 108 divides one frame picture into a plurality of blocks (eachconsisting of 16×16 pixels, for example) and calculates a temporalvariation Dt_blk and a spatial variation Ds_blk on a block-by-blockbasis by the following Equation (6) and (7), respectively. The temporalvariation Dt_blk can be calculated by averaging the sum of thedifferences between the picture data of two vertically adjacent pixelswithin one block. On the other hand, the spatial variation Ds_blk can becalculated by averaging the sum of the differences (B) betweenvertically adjacent pixels in a field representing the odd-numberedlines of each block and a field representing the even-numbered linesthereof.

$\begin{matrix}{{Dt\_ blk} = {\sum\limits_{x,y}{{{{F\left( {x,y} \right)} - {F\left( {x,{y + 1}} \right)}}}/{Nt\_ blk}}}} & \left( {{Equation}\mspace{20mu} 6} \right) \\{{Ds\_ blk} = {\sum\limits_{x,y}{{{{F\left( {x,y} \right)} - {F\left( {x,{y + 2}} \right)}}}/{Ns\_ blk}}}} & \left( {{Equation}\mspace{20mu} 7} \right)\end{matrix}$where F(x, y) represents pixel data at the coordinates (x, y) within ablock and Nt_blk and Ns_blk represent the number of difference datacounts to be added together in Equation (6) and the number of differencedata counts to be added together in Equation (7), respectively.

Based on the temporal variation Dt_blk and spatial variation Ds_blk thusobtained, the degree-of-variation parameter calculating section 108determines, by the following inequalities (8), whether or not each blockhas a high degree of field correlation:Dt _(—) blk>K1·Ds _(—) blk and Dt _(—) blk>K2  (Inequalities 8)where K1 and K2 are constants. If the inequalities (8) are satisfied,the given block is considered as a block having a high degree of fieldcorrelation, which means that the moving picture has a fast motion(i.e., variation).

The degree-of-variation parameter calculating section 108 counts thenumber of blocks that have been judged as having a high degree of fieldcorrelation and holds it as High_blks. Then, the degree-of-variationparameter calculating section 108 obtains the ratio of the number ofblocks counted High_blks to that of all blocks All_blks subjected to thedecision by the following Equation (9) and uses that ratio as thedegree-of-variation parameter Cf of the frame picture:

$\begin{matrix}{{Cf} = \frac{High\_ blks}{All\_ blks}} & \left( {{Equation}\mspace{20mu} 9} \right)\end{matrix}$

In Equations (6) and (7), the block-by-block temporal and spatialvariations Dt_blk and Ds_blk are obtained by averaging the sum of theabsolute values of the differences. Alternatively, these variations mayalso be obtained by averaging the sum of the squares of the differencesas in the following Equations (10) and (11):

$\begin{matrix}{{Dt\_ blk} = {\sum\limits_{x,y}{\left\{ {{F\left( {x,y} \right)} - {F\left( {x,{y + 1}} \right)}} \right\}^{2}/{Nt\_ blk}}}} & \left( {{Equation}\mspace{20mu} 10} \right) \\{{Ds\_ blk} = {\sum\limits_{x,y}{\left\{ {{F\left( {x,y} \right)} - {F\left( {x,{y + 2}} \right)}} \right\}^{2}/{Ns\_ blk}}}} & \left( {{Equation}\mspace{20mu} 11} \right)\end{matrix}$where the respective terms represent the same quantities as thecounterparts of Equations (6) and (7). As another alternative, theblock-by-block temporal and spatial variations Dt_blk and Ds_blk mayalso be obtained by other formulae using differential quantities. Forexample, in an MPEG-2 coding process, the estimates for determining theDCT modes (i.e., a frame DCT and a field DCT) of a macroblock(consisting of multiple 16×16 pixel blocks) may be used as the temporalvariation Dt_blk and spatial variation Ds_blk, respectively.

In Equation (9), the ratio of the number of blocks that have been judgedas having a high degree of field correlation to the overall number ofblocks is used as the degree-of-variation parameter Cf. Alternatively,the number of such blocks judged as having a high degree of fieldcorrelation (i.e., the High_blks value itself) may be used as thedegree-of-variation parameter Cf.

In any of the methods described above, the degree-of-variation parametercalculating section 108 calculates the degree-of-variation parameter Cfbased on the picture data of two field pictures that make up one framepicture.

Next, in Step 603 shown in FIG. 6, the predicting method determiningsection 109 determines, by the degree-of-variation parameter calculated,what coding method to take for each frame picture to becompression-coded. As a result of this process step, it is determinedinto which of I-, P- and B-pictures each frame picture should becompression-coded in the end, and at the same time, the M value shown inFIG. 2 is determined, too. Subsequently, in Step 604, the predictingmethod determining section 109 determines the structure of the pictureto be compression-coded for each of the pictures that make up the movingpicture data.

Hereinafter, these process steps 603 and 604 to be carried out by thepredicting method determining section 109 will be described in furtherdetail. FIG. 9 shows the order of processing for determining the codingmethod on a frame picture basis and the picture structure forcompression coding. The process shown in FIG. 9 consists of processingsteps 901 through 914. Among these processing steps, Steps 901 and 902are performed by the degree-of-variation parameter calculating section108 and are shown here just to clarify the processing flow. Thepredicting method determining section 109 actually carries out Step 903and following processing steps.

In those steps 903 through 914 shown in FIG. 9, Steps 903 through 910make up the process for determining the coding method on the framepicture basis and Steps 911 through 914 make up the process fordetermining the picture structure for compression coding.

First, the process consisting of Steps 903 through 910 for determiningthe coding method on the frame picture basis will be described. In Step903, the predicting method determining section 109 determines whether ornot the degree-of-variation parameter Cf calculated by thedegree-of-variation parameter calculating section 108 is greater than afirst threshold value TH1. If the answer is YES, then the predictingmethod determining section 109 judges that the moving picture has aquick motion and the process advances to Step 904. Otherwise, theprocess advances to Step 907.

In Step 904, the predicting method determining section 109 decreases thereference picture interval M shown in FIG. 2 by a predetermined value(e.g., 1), thereby narrowing the interval between I- and P-pictures orbetween P-pictures. In this manner, the moving picture coder 100 canincrease the frequency of occurrence of frame pictures to be coded as I-or P-pictures and can cope with a moving picture with a quick motion.

However, various inconveniences should be caused if the modifiedreference picture interval M were too small (e.g., became zero). Thus,that M value needs to be controlled. For that reason, the predictingmethod determining section 109 determines in Step 905 whether or not themodified M value is smaller than a minimum value Mmin. If the answer isYES, then the process advances to Step 906. Otherwise, the process jumpsto Step 911. In Step 906, the predicting method determining section 109sets the modified M value equal to the minimum value Mmin and then theprocess advances to Step 911.

In Step 907, the predicting method determining section 109 compares thevalue of the degree-of-variation parameter Cf with a second thresholdvalue TH2. If the degree-of-variation parameter Cf is smaller than thesecond threshold value TH2, then the process advances to Step 908.Otherwise, the process advances to Step 911. In Step 908, the predictingmethod determining section 109 increases the reference picture intervalM shown in FIG. 2 by a predetermined value (e.g., 1), thereby broadeningthe interval between I- and P-pictures or between P-pictures. As aresult, even a moving picture with a slow motion can be codedefficiently.

However, various inconveniences should be caused in terms of thecapacity of the input picture memory 101 and the amount of codingprocessing delay if the modified reference picture interval M were toobroad. Thus, that M value needs to be controlled. For that reason, thepredicting method determining section 109 determines in Step 909 whetheror not the modified M value is greater than a maximum value Mmax. If theanswer is YES, then the process advances to Step 910. Otherwise, theprocess jumps to Step 911. In Step 910, the predicting methoddetermining section 109 sets the modified M value equal to the maximumvalue Mmax and then the process advances to Step 911.

By performing the process described above, the predicting methoddetermining section 109 can determine the interval between the I- andP-pictures or between the P-pictures. Consequently, particularly whenthe degree-of-variation parameter is large (i.e., when the temporalvariation of a moving picture signal is greater than the spatialvariation thereof), the predicting method determining section 109 canminimize the decrease in prediction efficiency by narrowing thereference picture interval M.

It should be noted that in Steps 901 and 902, the degree-of-variationparameter Cf is supposed to be calculated for a picture to becompression-coded as an I- or P-picture and B-pictures are not takeninto consideration. This is because B-pictures are never used asreference pictures and there is no need to perform the foregoing processon the B-pictures. Still, it is possible to calculate thedegree-of-variation parameter of B-pictures and determine the referencepicture interval using that parameter.

Next, the process consisting of Steps 911 through 914 for determiningthe picture structure for compression coding will be described. As usedherein, “to determine the picture structure” means to determine whetherthe picture unit for compression coding should be a frame picture or afield picture to make up the frame picture. The former picture structurewill be referred to herein as a “frame structure” and the latter picturestructure will be referred to herein as a “field structure”.

First, in Step 911, the predicting method determining section 109determines whether or not the degree-of-variation parameter. Cfcalculated in Step 902 is greater than a third threshold value TH3. Ifthe answer is YES, then the process advances to Step 912. Otherwise, theprocess advances to Step 913. In Step 912, the predicting methoddetermining section 109 makes the settings such that every picture to becoded after the frame picture, for which the degree-of-variationparameter has been calculated, should have a field structure as itspicture structure. This is because the moving picture appears to suchhave a violent motion that the decrease in prediction efficiency needsto be minimized. When a moving picture has a quick motion, predictioncan be done accurately and the quality of the compression-coded movingpicture can be kept high by performing compression coding on a fieldpicture basis. Thereafter, the process ends.

On the other hand, in Step 913, the degree-of-variation parameter Cf iscompared with a fourth threshold value TH4. If the degree-of-variationparameter Cf is smaller than the fourth threshold value TH4, then theprocess advances to Step 914. Otherwise, the process ends. In Step 914,the predicting method determining section 109 makes the settings suchthat every picture to be coded after that should have a frame structureas its picture structure. Thereafter, the process ends.

By performing these operations, particularly when thedegree-of-variation parameter is large (i.e., if the temporal variationof the moving picture data is greater than the spatial variationthereof), the decrease in prediction efficiency can be minimized byadopting the field structure for the I-picture or P-picture. A B-picturemay be coded by the same picture structure as that of the previouslycoded I- or P-picture. Alternatively, the picture structure of aB-picture may be directly determined by using the degree-of-variationparameter Cf. As another alternative, the picture structure may also befixed.

As for the process shown in FIG. 9, the degree-of-variation parameter ofan I- or P-picture as a candidate picture is supposed to be calculatedand the picture structure of that picture is supposed to be switchedinto a frame structure or a field structure. Alternatively, either anI-picture or a P-picture alone may have its picture structure switched.

The processes associated with Steps 603 and 604 shown in FIG. 6 havebeen described in detail with reference to FIG. 9. Steps 901 through 914shown in FIG. 9 are a processing procedure to allow the predictingmethod determining section 109 to carry out Steps 603 and 604continuously. Optionally, the predicting method determining section 109may selectively carry out only the processing steps associated with Step603 or those associated with Step 604. FIG. 10 shows the order ofprocessing, associated with Step 603, for determining a coding method ona frame picture basis. FIG. 11 shows the order of processing, associatedwith Step 604, for determining a picture structure for compressioncoding. In FIGS. 10 and 11, each step identical with the counterpartshown in FIG. 9 is identified by the same reference numeral. As can beseen from these drawings, all of these steps are already shown in FIG. 9and the description thereof will be omitted herein.

Next, in Step 605 shown in FIG. 6, in accordance with the coding methodand picture structure that have been determined by the predicting methoddetermining section 109, the processing section compression-codes themoving picture data stored in the memory, thereby generatingcompression-coded data. For example, if the picture structure selectedis a frame structure and if the respective frame pictures arecompression-coded as I-, B- and P-pictures as shown in the upper part ofFIG. 3( c) (i.e., in the order of input), then the coding order controlsection 110 determines that the pictures should be coded in the ordershown in the lower part of FIG. 3( c) (i.e., in the order of coding).Then, the motion vector estimating section 103 and DCT/quantizingsection 105 read and process the picture data representing the framepictures in that order. Thereafter, the picture data is furtherprocessed by other components, thereby generating compressed dataincluding I-, B- and P-pictures.

Finally, in Step 606 shown in FIG. 6, the processing steps 602 through605 are repeatedly carried out until every moving picture data iscompression-coded. In this manner, compressed data is generated from themoving picture data.

FIGS. 12( a) and 12(b) show the data structures of picture data includedin the compressed data generated. Specifically, FIG. 12( a) shows thedata structure of the picture data that has been compression-coded bythe frame structure. As can be seen from FIG. 12( a), the picture datais located next to a picture header, which includes a picture type fieldand a picture structure field as its main fields. In the picture typefield, the picture type of the picture data, i.e., an I-picture, aB-picture or a P-picture, is described. In the picture structure fieldon the other hand, information indicating whether the picture of thepicture data has the frame structure or the field structure isdescribed. In FIG. 12( a), information indicating that the picture hasthe frame structure is described in the picture structure field. Thepicture data includes data representing a first field picture and datarepresenting a second field picture as a mixture. These two fields willbe separated from each other when the compression-coded picture data isread.

On the other hand, FIG. 12( b) shows the data structure of picture data(i.e., a frame picture) that has been compression-coded by the fieldstructure. This data structure includes a first-field picture header,first-field picture data, a second-field picture header, andsecond-field picture data in this order. The first field picture can beobtained based on the first-field picture header and first-field picturedata, while the second field picture can be obtained based on thesecond-field picture header and second-field picture data. The datastructure of each of these picture headers includes a picture type fieldand a picture structure field as in the frame structure described above.In this case, however, the picture type is specified field by field.Accordingly, in an I-frame, for example, a picture type indicating thatthe first field is an I-field is described in the first-field pictureheader and a picture type indicating that the second field is an I-fieldor a P-field is described in the second-field picture header. In each ofthe picture structure fields, information indicating the identity of itsassociated field is described.

FIG. 13 shows relationships between the degree-of-variation parameterand the picture structure of compressed data. In FIG. 13, I, B and Pdenote an I-picture, a B-picture and a P-picture, respectively. Thenumeral attached to I, B or P indicates the frame number as counted fromthe first I picture. The picture structure of each picture encircledwith the solid line (i.e., I1, B2, P3 and so on) is supposed to be framestructure, while the picture structure of each picture encircled withthe dashed line (i.e., P4, P5 and P6) is supposed to be field structure.

In FIG. 13, each of the first three pictures I1, B2 and P3 is coded withM=2 and by the frame structure. In this case, these pictures are codedin the order of I1, P3 and B2.

However, the picture structure of the following picture P4 is changedinto field structure. This is because the degree-of-variation parameterCf, calculated for the picture P3, satisfies Cf>TH1 and Cf>TH3. As aresult, the reference picture interval M is changed from M=2 into M=1(see Step 904 shown in FIG. 9) and the picture structure is also changedinto field structure (see Step 912). Consequently, the reference pictureinterval becomes one field and good prediction efficiency can bemaintained even with respect to a picture with a quick motion.

Next, while pictures P4 and P5 are being coded on a field-by-fieldbasis, the degree-of-variation parameter Cf, calculated for the pictureP5, satisfies Cf<TH4 and therefore, the picture structure is changedfrom field structure into frame structure (see Step 914). Thereafter,since the degree-of-variation parameter Cf, calculated for the nextpicture P6, satisfies Cf<TH2, the reference picture interval M ischanged from M=1 into M=2 (see Step 907).

According to the results of the processing described above, if aP-picture satisfies M=1, its picture structure may be field structure.On the other hand, if the P-picture satisfies M≧2, its picture structuremay be frame structure. However, this is just an example. Alternatively,when M=1, the first field of an I-picture may be an I-field and thesecond field thereof may be a P-field, for example. As anotheralternative, no matter whether M=1 or M≧2 (i.e., whatever the M valuemay be), the picture structure of a P-picture may always be a framestructure. Also, the picture structure of an I-picture or a P-picturemay be the same as that of the previous I- or P-picture. Furthermore,the picture structure of a B-picture may be the same as that of itsreference I- or P-picture.

As for the threshold values TH1 through TH4 described above, a simplercontrol is realized by setting TH1=TH3 and TH2=TH4. In the example shownin FIG. 13, it is only necessary to switch a first state in which M=2and frame structure is adopted into a second state in which M=1 andfield structure is adopted, or vice versa, thus simplifying theprocessing.

In the example described above, M=2 is switched into M=1 and vice versa.Alternatively, the two M values to be switched may have a difference of2 or more (e.g., M=3 may be switched into M=1 and vice versa). Asanother alternative, three or more M values (e.g., M=3, M=2 and M=1) maybe switched one after another.

Next, another processing to be carried out by the predicting methoddetermining section 109 for determining the coding method and picturestructure of each picture will be described with reference to FIG. 14.FIG. 14 shows the order of processing for determining a frame picturecoding method according to a predetermined period and a picturestructure for compression coding. As used herein, the “predeterminedperiod” is a period between an I-picture and the next I-picture (i.e.,the interval N shown in FIG. 2), the period of P-pictures (i.e., theinterval M shown in FIG. 2) and a period that is longer than any ofthese periods an integral number of times.

As in the example described above, the “I-picture” and “P-picture” referto a candidate picture to be compression-coded as an I-picture and acandidate picture to be compression-coded as a P-picture, respectively.Among multiple pictures included between an I-picture and the nextI-picture, a group consisting of the top I-picture and following P and Bpictures is called a “group of pictures (GOP)”. A GOP has a lengthcorresponding to a moving picture playback time of about 0.5 seconds. Inthe following description, the “period” is supposed to be a period froman I-picture to the next I-picture (i.e., a GOP period).

First, in Step 1401, the degree-of-variation parameter calculatingsection 108 determines whether or not the picture to be coded is thecandidate picture at the top of a GOP (which will be referred to hereinas a “top picture”). If the answer is YES, the process advances to Step1402. Otherwise, the process jumps to Step 1403. In Step 1402, thedegree-of-variation parameter calculating section 108 resets the valueof a parameter SumCf to zero and the process advances to the next step1403. The parameter SumCf is used to hold the sum of thedegree-of-variation parameters Cf.

The degree-of-variation parameter calculating section 108 calculates thedegree-of-variation parameter Cf of the picture in Step 1403 and thenadds it to the value of the parameter SumCf in the next step 1404,thereby updating the parameter SumCf depending on the result. In thenext step 1405, the degree-of-variation parameter calculating section108 determines whether or not the picture being processed is thecandidate picture at the end of one GOP period (which will be referredto herein as a “last candidate picture”). If the answer is YES, theprocess advances to Step 1406. Otherwise, the processing shown in FIG.14 is ended and the picture is compression-coded without changing thecurrent coding conditions at all. Thereafter, the processing startingfrom Step 1401 will be carried out all over again on the next picture.

In Step 1406, the predicting method determining section 109 determinesthe coding condition in the following manner. Specifically, in Step1406, the predicting method determining section 109 determines whetheror not the value of the parameter SumCf is greater than a fifththreshold value TH5. If the answer is YES, the process advances to Step1407. Otherwise, the process advances to Step 1410.

In Step 1407, the predicting method determining section 109 decreasesthe interval M of the reference pictures (i.e., I-pictures orP-pictures), included in the next and following periods, by apredetermined value (e.g., 1). This means that the coding condition isadjusted for the pictures of the next period according to the tendencyof the pictures included in the current period.

Next, in Step 1408, the predicting method determining section 109determines whether or not the modified M value is smaller than theminimum value Mmin. If the answer is YES, then the process advances toStep 1409. Otherwise, the process jumps to Step 1414. In Step 1409, thepredicting method determining section 109 sets the modified M valueequal to the minimum value Mmin and then the process advances to Step1414. These steps 1408 and 1409 are provided for the same reason asSteps 905 and 906 shown in FIG. 9.

In Step 1410, the predicting method determining section 109 compares thevalue of the parameter SumCf with a sixth threshold value TH6. If thevalue of the parameter SumCf is smaller than the threshold value TH6,the process advances to Step 1411. Otherwise, the process advances toStep 1414.

In Step 1411, the predicting method determining section 109 increasesthe interval M of the reference pictures, included in the next andfollowing periods, by a predetermined value (e.g., 1). That is to say,as already described for Step 1407, the coding condition is adjusted forthe pictures of the next period according to the tendency of thepictures included in the current period.

Next, in Step 1412, the predicting method determining section 109determines whether or not the modified M value is greater than themaximum value Mmax. If the answer is YES, then the process advances toStep 1413. Otherwise, the process jumps to Step 1414. In Step 1413, thepredicting method determining section 109 sets the modified M valueequal to the maximum value Mmax and then the process advances to Step1414.

Steps 1414 through 1417 make up a process for determining the picturestructure, which is one of the coding conditions for the pictures of thenext period. First, in Step 1414, the predicting method determiningsection 109 compares the value of the parameter SumCf with a sevenththreshold value. If the value of the parameter SumCf is greater than thethreshold value TH7, the process advances to Step 1415. Otherwise, theprocess advances to Step 1416.

In Step 1415, the settings are made such that every picture, which isincluded in the next or following period and which has the specifiedpicture type, be coded by the field structure. The reason is as follows.Specifically, since the value of the parameter SumCf is greater than thethreshold value TH7, each picture appears to such have a violent motionthat the decrease in prediction efficiency needs to be minimized for thenext period.

On the other hand, in Step 1416, the value of the parameter SumCf iscompared with an eighth threshold value TH8. If the degree-of-variationparameter Cf is smaller than the eighth threshold value TH8, then theprocess advances to Step 1417. Otherwise, the process ends. In Step1417, the predicting method determining section 109 makes the settingssuch that every picture, which is included in the next or followingperiod and which has the specified picture type, be coded by the framestructure. Thereafter, the process ends.

By performing these operations, particularly when thedegree-of-variation parameter is large (i.e., if the temporal variationof the moving picture data is greater than the spatial variationthereof), the decrease in prediction efficiency can be minimized bynarrowing the reference picture interval M and by adopting the fieldstructure for the I-picture or P-picture.

Next, it will be described how to handle the compressed data generated.FIG. 15( a) shows an arrangement of functional blocks for an encodingsystem 10. The encoding system 10 includes the coder 100, a transmittingsection 150 and a writing section 151. The encoding system 10 may beinstalled as broadcasting equipment at a broadcasting station. In thatcase, an edited moving picture is transformed by the moving picturecoder 100 into compressed data, which is transmitted by the transmittingsection 150 to user's home by way of a transport medium such as radiowave or a transmission line. Alternatively, the compressed data, whichhas been output from the moving picture coder 100, is written by thewriting section 151 on a storage medium 200. Examples of preferredstorage media 200 include optical storage media such as optical discs,semiconductor storage media such as an SD memory card, and magneticrecording media such as a hard disk. If the picture quality may bealmost equal to the conventional one, then the frequency band andtransmission time required for transmission can be cut down or therequired storage capacity of the storage medium 200 can be reducedbecause the compressed data has a smaller amount of data.

Alternatively, the encoding system 10 is also implementable with ageneral purpose PC. In that case, the moving picture coder 100 may be anencoder board, which is built in a PC, for example. If the incomingmoving picture signal is a TV signal, then the PC 10 stores compresseddata about a TV program on a hard disk 200 within a hard disk drive 151.

On the other hand, FIG. 15( b) shows an arrangement of functional blocksfor a decoding system 11. The decoding system 11 includes a receivingsection 160, a reading section 161, a decoder 300 and a display section170. The decoding system 11 may be installed as an audiovisual system ata TV viewer's home. In that case, the receiving section 160 may beeither an antenna to receive radio wave carrying compressed data or aset top box receiving port to receive a broadcast signal carryingcompressed data. The reading section 161 may be a drive or a memory cardslot (not shown) for reading out compressed data from the storage medium200. The decoder 300 has the function of decoding the compressed data.For example, if the compressed data is generated in compliance with anMPEG standard, then the decoder 300 is preferably an MPEG decoder thatcan analyze the data structure shown in FIG. 12 and can decode thecompressed data based on the result of analysis. However, this decodingfunction is not one of the principal features of the present inventionand further description of the decoder 300 will be omitted herein. Thedisplay section 170 may be a TV set with a loudspeaker. The viewer caneither receive the compressed data at the decoding system 11 or read itout from the storage medium 200 and decode it so as to view the movingpicture.

Preferred configuration and operation of the moving picture coder 100are as described above. The moving picture coder 100 of the presentinvention controls dynamically the interval between an I-picture and aP-picture and/or the interval between P-pictures according to thedegree-of-variation parameter representing how much the moving picturehas changed. In addition, the moving picture coder 100 also dynamicallyswitches the picture structure from the frame structure into fieldstructure, or vice versa, thereby increasing the coding efficiency aswell. Accordingly, compared with compressed data generated by aconventional coder, the compressed data generated by the moving picturecoder 100 ensures a higher playback picture quality if the amounts ofdata included are almost the same or can cut down the amount of dataincluded if the picture qualities are almost the same. Thus, accordingto the present invention, compression coding is realized with sufficientquality maintained and with much more efficiency.

It should be noted that specific values of the threshold values TH1through TH8 mentioned above may be determined arbitrarily by themanufacturer of the moving picture coder 100 in accordance with itsspecifications. Alternatively, any threshold values TH1 through TH8 mayalso be selected according to the required quality of the compresseddata.

In the preferred embodiments described above, the moving picture to beprocessed by the picture coder 100 is supposed to be an interlacedpicture. Optionally, the present invention is also applicable to aprogressive picture. In the progressive picture, however, there are nofield pictures but only frame pictures are included. Accordingly, twoconsecutive frame pictures to be presented every 1/60 second may be usedas the first and second fields described above. In that case, F(x, y) ofEquation (1) and so on may be replaced with the pixel value G₁(x, y) ofthe first frame picture and F(x, y+1) thereof may be replaced with thepixel value G₂(x, y) of the second frame picture. Also, in Equation (2)and so on, F(x, y) may be replaced with the pixel value G₂(x, y) of thefirst frame picture and F (x, y+2) thereof may be replaced with thepixel value G₁(x, y+1) of the first frame picture. Then, the temporaland spatial variations can be obtained by performing quite the sameprocessing as that already described for the interlacing method.

The data processor 100 performs the processing described above based ona computer program. For example, the process for generating thecompressed data is carried out by executing a computer program that isdescribed based on the flowcharts shown in FIGS. 6, 9 and 14. Thecomputer program may be stored in any of various types of storage media.Examples of preferred storage media include optical storage media suchas optical discs, semiconductor storage media such as an SD memory cardand an EEPROM, and magnetic recording media such as a flexible disk.Alternatively, the computer program may also be downloaded via atelecommunications line (e.g., through the Internet, for example) andinstalled in the optical disc drive 100.

INDUSTRIAL APPLICABILITY

The present invention provides a data processor and a data processingmethod for compression-coding moving picture data more efficiently whilemaintaining good quality. The present invention is effectivelyapplicable for use in the fields of data processing including writing,transferring and reading compression-coded data.

1. A data processor for compression-coding moving picture data,representing a moving picture, on the basis of a predetermined pictureunit by an intra-picture coding method, a forward predictive codingmethod or a bidirectional predictive coding method, the moving picturebeing obtained by presenting a plurality of frame pictures, eachconsisting of two field pictures, one after another, the data processorcomprising: a memory for storing the moving picture data; a calculatingsection for calculating a parameter, representing a magnitude on howmuch the moving picture has changed, based on the moving picture data ofthe two field pictures; a determining section for determining, by theparameter that has been calculated by the calculating section, aninterval M of picture units, for which the moving picture data is goingto be compression-coded by the intra-picture coding method and theforward predictive coding method and adopting a picture structuredefining the predetermined picture unit; and a processing section forcompression-coding the moving picture data, stored in the memory,according to the interval M and the picture structure that have beendetermined and adopted by the determining section, thereby generatingcompressed data, wherein if the parameter is equal to or greater than apredetermined threshold value, the determining section determines thatthe value of the interval M is 1 and that the picture unit is a fieldpicture, and if the parameter is smaller than a predetermined thresholdvalue, the determining section determines that the interval M is equalto or greater than 2 and that the picture unit is a frame picture. 2.The data processor of claim 1, wherein if the value of the interval M is1, the determining section adopts a field structure as the picturestructure for the pictures compression-coded by the intra-picture codingmethod and the forward predictive coding method, and adopts a framestructure as the picture structure for the pictures compression-coded bythe bidirectional predictive coding method.
 3. The data processor ofclaim 1, wherein if the value of the interval M is 1, the determiningsection adopts a field structure as the picture structure for thepictures compression-coded by the intra-picture coding method, whereinthe determining section determines that the moving picture data of afirst field is compression-coded by the intra-picture coding method andthat the moving picture data of a second field by the forward predictivecoding method.
 4. A data processing system comprising: a data processorfor compression-coding moving picture data, representing a movingpicture, on the basis of a predetermined picture unit by anintra-picture coding method, a forward predictive coding method or abidirectional predictive coding method, the moving picture beingobtained by presenting a plurality of frame pictures, each consisting oftwo field pictures, one after another, and a transmitting section,wherein the data processor includes: a memory for storing the movingpicture data; a calculating section for calculating a parameter,representing a magnitude on how much the moving picture has changed,based on the moving picture data of the two field pictures; adetermining section for determining, by the parameter that has beencalculated by the calculating section, an interval M of picture units,for which the moving picture data is going to be compression-coded bythe intra-picture coding method and the forward predictive coding methodand adopting a picture structure defining the predetermined pictureunit; and a processing section for compression-coding the moving picturedata, stored in the memory, according to the interval M and the picturestructure that have been determined and adopted by the determiningsection, thereby generating compressed data, wherein: if the parameteris equal to or greater than a predetermined threshold value, thedetermining section determines that the value of the interval M is 1 andthat the picture unit is a field picture, if the parameter is smallerthan a predetermined threshold value, the determining section determinesthat the interval M is equal to or greater than 2 and that the pictureunit is a frame picture, and the transmitting section transmits thecompressed data, which has been generated by the processing section ofthe data processor, through a transport medium.
 5. A data processingsystem comprising: a data processor for compression-coding movingpicture data, representing a moving picture, on the basis of apredetermined picture unit by an intra-picture coding method, a forwardpredictive coding method or a bidirectional predictive coding method,the moving picture being obtained by presenting a plurality of framepictures, each consisting of two field pictures, one after another, anda writing section, wherein the data processor includes: a memory forstoring the moving picture data; a calculating section for calculating aparameter, representing a magnitude on how much the moving picture haschanged, based on the moving picture data of the two field pictures; adetermining section for determining, by the parameter that has beencalculated by the calculating section, an interval M of picture units,for which the moving picture data is going to be compression-coded bythe intra-picture coding method and the forward predictive coding methodand adopting a picture structure defining the predetermined pictureunit; and a processing section for compression-coding the moving picturedata, stored in the memory, according to the interval M and the picturestructure that have been determined and adopted by the determiningsection, thereby generating compressed data, wherein: if the parameteris equal to or greater than a predetermined threshold value, thedetermining section determines that the value of the interval M is 1 andthat the picture unit is a field picture, if the parameter is smallerthan a predetermined threshold value, the determining section determinesthat the interval M is equal to or greater than 2 and that the pictureunit is a frame picture, and the writing section writes the compresseddata, which has been generated by the processing section of the dataprocessor, onto a storage medium.
 6. A data processing method forcompression-coding moving picture data, representing a moving picture,on the basis of a predetermined picture unit by an intra-picture codingmethod, a forward predictive coding method or a bidirectional predictivecoding method, the moving picture being obtained by presenting aplurality of frame pictures, each consisting of two field pictures, oneafter another, the method comprising the steps of: storing the movingpicture data; calculating a parameter, representing a magnitude on howmuch the moving picture has changed, based on the moving picture data ofthe two field pictures; determining, by the parameter calculated, aninterval M of picture units, for which the moving picture data is goingto be compression-coded by the intra-picture coding method and theforward predictive coding method and adopting a picture structuredefining the predetermined picture unit; and compression-coding themoving picture data according to the interval M and the picturestructure that have been determined and adopted, thereby generatingcompressed data, wherein: if the parameter is equal to or greater than apredetermined threshold value, the determining section determines thatthe value of the interval M is 1 and that the picture unit is a fieldpicture, and if the parameter is smaller than a predetermined thresholdvalue, the determining section determines that the interval M is equalto or greater than 2 and that the picture unit is a frame picture.